package com.maiyuren.fishkit

import android.app.Application
import com.maiyuren.fishkit.utils.setLogConfig
import com.maiyuren.fishkit.utils.setLogTag
import zlc.season.butterfly.Butterfly

open class FishkitApplication: Application() {
    companion object {
        private lateinit var s_instance: FishkitApplication;

        val instance by lazy {
            s_instance
        }
    }

    override fun onCreate() {
        super.onCreate()
        s_instance = this;

        Butterfly.enableLog(true)
        this.initLogConfig("fishkit_log", true)
    }

    fun initLogConfig(logTag: String?, enable: Boolean = true) {
        logTag.setLogTag();
        enable.setLogConfig();
    }
}